1. Field of the Invention
The present invention relates to a cryptographic processing apparatus and a method and in particular to a cryptographic processing apparatus and a method that perform cryptography processing, namely, encryption or decryption on data to be accessed, based on information indicating the location of the data on a storage medium (location information).
2. Description of Related Art
In recent years, there has been increased the need to manage data on a storage medium such as a hard disk drive (HDD) or flash memory by performing cryptography processing, namely, encryption or decryption on the data. Advanced encryption standard (AES)-XTS is becoming a standard cryptographic processing method for such storage media. In AES-XTS, AES encryption is performed on the sector number for identifying the location of data to be accessed on the disk of the storage medium. Then, the data is AES-encrypted or AES-decrypted using the AES-encrypted sector number. Thus, even if pieces of data having the same contents appear at different sector numbers, the encryption results of the pieces of data can differ from each other.
Japanese Unexamined Patent Application Publication No. 2008-141284 discloses technology on a magnetic storage device that encrypts the sector number and uses the encrypted sector number to encrypt data. A magnetic storage device according to Japanese Unexamined Patent Application Publication No. 2008-141284 includes a scrambler including a shift register composed of multiple stages and an exclusive OR circuit. The exclusive OR circuit obtains an exclusive OR of logic of a stage of the shift register corresponding to one generator polynomial. The scrambler is configured so that the output of the exclusive OR circuit is fed back to the first stage of the shift register. The binary-coded number or the like of the sector number is set as the initial value for the shift register composed of multiple stages.